(#24) - adjust save function