working with pouchdb