fixing as_json