Solved up to problem 23