updating and adding documents to couchdb