completed exercises 7 & 8