added function to catch changes in local pouchdb