Solution 5 finished