reroute function

cuts the route if its unefficent