finished up the thread controller