some more refactoring of tcp v5