generation of flags and error domains added