quality control loops