similar to above - you can simplify the pattern matching here