added new algorithm to search a route using a from and to edges