completed exercises 2 through 8