end for check flag #1