get the right transformation