added a persistence test
included persistence test in npm test