fixed error in book ex code