added multithreading on send