Solution 2: