rearrange routes in generator