On the evolution of multicellularity