seems like we need enum_mask #2988 (with a better names) :)