add passing test for array sum function