; (B) with respect to each identified deficiency, require the prime sponsor— (i) to correct the deficiency immediately, if the Secretary finds that the deficiency threatens the health or safety of staff or program participants or poses a threat to the integrity of Federal funds; (ii) to correct the deficiency not later than 90 days after the identification of the deficiency if the Secretary finds, in the discretion of the Secretary, that such a 90-day period is reasonable, in light of the nature and magnitude of the deficiency; or (iii) in the discretion of the Secretary (taking into consideration the seriousness of the deficiency and the time reasonably required to correct the deficiency), to comply with the requirements of paragraph (2) concerning a quality improvement plan; and (C) initiate proceedings to terminate the designation of the prime sponsor unless the prime sponsor corrects the deficiency. (2) Quality improvement plan (A) Prime sponsor and program responsibilities To retain a designation as a prime sponsor under this title, a prime sponsor that is the subject of a determination described in paragraph (1) (excluding a prime sponsor required to correct a deficiency immediately or during a 90-day period under clause (i) or (ii) of paragraph (1)(B)) shall— (i) develop in a timely manner, a quality improvement plan that shall be subject to the approval of the Secretary, and that shall specify— (I) the deficiencies to be corrected; (II) the actions to be taken to correct such deficiencies; and (III) the timetable for accomplishment of the corrective actions specified