What is the main function of the retina in the eye?