Solution 2 and 4 solved