added database wrapper for pouchdb