Solution 1 completed