The N- and C-termini of flagellin form the inner core of the flagellin protein, and is responsible for flagellin's ability to polymerize into a filament. The middle residues make up the outer surface of the flagellar filament. While the termini of the protein are quite similar among all bacterial flagellins, the middle portion is wildly variable.