Together with the leading flagellum , the eyespot allows the organism to move in response to light to assist in photosynthesis , and to predict day and night , the primary function of circadian rhythms . Together with the leading flagellum , the eyespot allows the organism to move in response to light , often toward the light to assist in photosynthesis , and to predict day and night , the primary function of circadian rhythms .