Partial sum implementation

Indeed, Thanks!