functionality for save and load buttons