changing client to pure sockets