doing saving and loading of docs