clean out thread model to use c++11