code cleanup problem 23 and 24