get closest node