Finished PatternMatcher util