created WordMatcher class