Successfully tested sumSlice function