added required keyword to getFlags