added to_json method