adding unit tests and running total