update tcp and main