put dig in a thread