Added some code for route assembly