more work on tcp communication