Finish exercise 6.27