working on tcp output