edited sumSlice:accidentally put s++ instead of i++ which made the for loop an infinite loop