fixed getUniqueCoordinates method