added bitflag functions