preliminary changes
save function now uses append