Finish Chapt 6 exercise