implemented CouchDb backend