creating thread classes