separate class for closest points calculation added