refactored routeconfig to use json config