mechanism for saving and playing snapshots implemented

Signed-off-by:  <st9fan@gmail.com>