change CNT to FLAG