completed exercises 31 through 40