reads data from couchdb