refactor a customized matcher
improve function's name and remove an idle function