forward function

Extract forward and reverse transformations