added initial implementation of thread class