add thread / accu library
fix accumulator