Added ability to create a thread