Added an optional distance function to search