fixed as_json