Add createThread function

We had getThread, but not createThread