create and test threads