organize; more use of std::thread
remove pair classes