replaced cumulative sum with sum, maybe I'm not runnign 0.6.1 on SciNet?