Update Code Challenge 3: Pattern Matching Problem