end of day save (no where near complete. does not work!)