first draft to store snapshots in MongoDB