abandoning thread_wait for an executor
removed all of the thread_wait code and other commented code