what are the two stages of photosynthesis