a flag and a mask