changed client into two threads (send and recv)