Updated transformation algorithm.