“You are what you eat” is a common adage among humans, but a new study explains why it might be more apt for honeybees.

In a paper published Thursday in PLOS Genetics, researchers found specific molecules in the pollen and honey mixture that honeybee larvae feed on cause physical changes that determine whether females develop into long-living, reproductive queens or the mostly sterile workers that nourish larvae and collect food.

Researchers have long known that these differences are not determined at birth, but rather are a product of diet. Larvae that eat royal jelly, a substance secreted by the glands of nurse bees, develop into queens, while those that feed on a combination of pollen and honey called bee bread become workers.