prototype of snapshot.py