cleaned code and added TestThread into support class