got save and load functions working completely