sumArray not working