Implementation of snapshot