Chap 6 prob. 4 reformatting