Made methods and added almost working distance search function