first working version of dist using thread_queue