Added more details about nearest neighbor search