Problem 1 solution 2 with for comprehension