using flags instead of status bitfield