fix helper fn for creating couchdb views