fixed to search closest nodes first