closest pair fix