example 4-7: simple recursion