A model to explore the evolution of multicellularity