add more code for tcp client