updated distance search