setting up the framework for saving