added partial sums and other solutions