added getXYCoordinates and comparison methods