improved tcp client model