addded support for automatic snapshotting