Wrote nutrient level function