Transforming coordinates in am