Stellar occultation technique provides global measurements of the atmospheric composition with a high vertical resolution. The main interest of the GOMOS (Global Ozone Monitoring by Occultation of Stars) instrument is to measure ozone density at 10–100 km. The correlations between the cross sections of ozone, neutral density and aerosols are rather strong in the UV/visible wavelength region, which is typically used in the stellar occultation measurements. Due to this correlation also the errors of the retrieved quantities are correlated. Therefore, improvements in, e.g., neutral density retrieval will also improve ozone retrievals. We will here discuss how the ozone and aerosol retrievals can be improved by introducing prior information for the neutral density. The inverse problem rising in stellar occultation measurements is ill-posed in the sense that there is a discrete set of measurements but continuous gas density profiles are wanted. Formally the problem can be transformed to a well-posed problem by simply discretizing the atmosphere into equally many layers as there are measurements and assuming, e.g., constant density inside each layer. We discuss here the advantages of requiring stronger smoothness for the gas profiles by using the Tikhonov regularization method.