working client and socket