add snapshot and revert snapshot methods to VM