confusion about flags and modes