updated class to use bitflags