pattern matching notes