Problem 1 solved - First pass