This is copy of frsyuki's out_route