added outline for checkFlag()