more changes to couchDB plugin