The photosystems consist of arrays of chlorophyll molecules. Chlorophyll-- the green pigment of leaves-- absorbs light energy. The absorbed energy excites electrons to a higher energy level. Energized electrons from photosystem I are added to NADP+ to form NADPH, while energized electrons from photosystem II are passed through the electron transport chain. Their energy is used to pump hydrogen ions from the stroma into the thylakoid space, creating a concentration gradient. Electrons leaving the electron transport chain enter photosystem I, replenishing its lost electrons. Photosystem II replenishes its electrons by splitting water. Hydrogen ions and oxygen are released into the thylakoid space. This is where the oxygen gas generated by photosynthesis comes from.