using tcp and buffer reader