rewriting macros for easier reuse of flag-definitions code