flag changing finished