Adding thread.cpp