initialized some pthread stuff