fix snapshot
feat add snapCount parameter
merge with 0.2
test add snapshot tests
Merge branch 'fix-snapshot' into 0.2