issue with empty array sum