exercise3-recursive