finaly got categories to save back to couchdb