Completed problem 24