a piece of code that will do pattern matching