implemented draft of making a context in createthread function