fixed up ex 1.31, wrote ex. 1.33 (not tested yet)