Added a thread running class