Making TotalData threaded. increased performance by 50%
bug fix