adding a pattern matcher