refactored Map to Router