List<int> toBits(int value) { List<int> ls = []; for (int b in items.keys) { if (value & b == b) ls.add(b); } return ls; }