added some methods from main to all the threads. Not sure if bit is suppose to be in the program or not. The pre-code Interface only had T val. I added bit as well.