Structural and optical properties of CdS thin films