Refactaring pattern matcher
to 1.2.1