Investigations on the preparation and characterization of pure and rare earth doped ZnO nanorods and thin films