added more stuff to pthread_create, working on swapping threads