use partialsum