Trying to calculate closest