refactoring, basic router matching