new methods addFlag & hasFlag