rerouter2 by @matthewyu