add FormatRoutes function