added sum recursion