inverts the coordinate system