implemented abstract thread and abstract context thread classes