lower level access to flags and related methods

- throwing when setting flag failed
- able to get actual flag values