Finish ch6 excercise.