Finish exercise for Chapt. 5