first attempt at refactoring CoordinateTransform