Work out transformation