update for more proper way to flag manipulation