added lazy instantiation of couchdb