Modified view to work with couchDB