Energy Flow and Nutrient Cycling in Autotrophs and Heterotrophs