using matcher, fixing match bugs