added snapshotDestroy function