what are the 2 phases of photosyntheses