added KeyMatcher to replace matched key