improved route generation