added as_json methods