implement nearest_in_box method; improve docs