add multi-threaded loop, broken buzy wait sync