refactoring of UrlMatcher