added save and load functions (untested)