introducing random flag