Partial sum implementation

Fixed. Maybe one should update the copyrights in a different pr. I'll create an issue for that.