rewrote save/load so that it can be made modular