made changes to saving and loading