Completed exercises 6-10