completed ch4 Programming Challenge 21