How did The bacterial flagellum evolve?