IndexedDataset should be immutable, took out the dictionaries as vars