2 bit flags, 2 level dictionary