exercise 1.17 -- fast-mult