Program now can figure out any combination of flags that have been set