factor out coordinate transformation