new couchdb functions