Partial sum implementation

Fixed.