added recursion with cache example