updates to make saving and loading work