I suggest adding an option for distance-based filtering in the closest function. Currently, closest only allows selecting the number of closest intervals to report with the k parameter. It would be beneficial to include an option to filter intervals based on a maximum distance criterion. This enhancement would provide more flexibility and control in selecting intervals based on their proximity. I recommend considering the addition of this feature to improve the functionality of the closest function.