sum up an array using recursion