fixed drought function