corrected decrease function