finished adding document save, need to test