renamed client to socket