added homework exercise 12-1