[#1] Replaced function for list comprehension. Replaced case for pattern matching.