implement coordinate transformation