testing save snapshot function