rewrite quality control.py and finished generate_classify.py