finish exercise 4.3 in section 4.1.2