Working on TCP code