add a public method to change the couchdb setting
fix type error
alter code layout