Researchers from the University of Washington and North Carolina State University figured out the ratios of chemicals and excretion the ecosystems need to survive. In a new study published in the journal Ecological Monographs, the scientists detail how a loss of fish biodiversity could impact larger ecosystems as a whole.

Without fish diversity, coral reef environments would be less healthy, reports. And without a variety of fish species, the nutrient levels of entire ecosystems could be affected, harming seagrass beds and mangrove ecosystems. Previous research by the same scientists found that fish pee is a sort of fertilizer for coral, giving it the perfect levels of nitrogen and phosphorus.