added total time to stats and first unit tests