Among Florida carpenter ants there are the so-called majors, brawny soldiers that guard the colony, and the smaller minors that act as foragers. But membership in these castes is not set in stone, a new study found.

By treating ants with chemical compounds, researchers were able to make young majors behave like minors. The compound manipulates the ants’ epigenetic makeup, which governs which genes are turned on and off but does not alter their DNA.

“These are long-term, permanent changes that occur when we inject the brain with these chemicals,” said Shelley Berger, an epigeneticist at the University of Pennsylvania and one of the study’s authors.

However, the treatment did not alter the physical appearance of the ants; majors were still larger than minors. The study appeared in the journal Science.