updating corrected frequency algorithm