add distance functionality to basic web app