Got the accumulator to work with some help from stackoverflow. Yay!