Finished implementation of createThread

Fixed create thread. Relational algebra is hard.