Structural and optical properties of CdS nanorods and CdS/ZnS nanoslabs