flag mode analysis