adding a find_close utility function