refactored routing initialization