Closest Point logic added