completed ex5.6b