More readable code with bug:cannot create tcpModel in main