completed exercises 6 - 10