The helical 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 and can be absent in some species. The flagellin domains are numbered from the helical core (D0/D1) to the outside (D2, ...); when viewed from the amino-acid sequence, D0/D1 appears on the two termini. Flagellin-like structural proteins are found in other portions of the flagellum, such as the hook (flgE; ), the rod at the base, and the cap at the top.