task 04: pattern matching