completed exercises 7.3 and 7.4