Finished sumSlice() method