A little cleanup for problem 31