add Publish Snapshot code