merge Suin's change: save and load dictionary