create conn on thread