refactor encoded values changes and test that resetDictionary works