Made the solution more concise using a filter clause
Solve problem 20