How does the process of photosynthesis contribute to the cycling of carbon through the environment?