complete the code of converting routes to routemod messages