send code with new thread