use flags instead of struct conf