use BitSet for states