added to_json feature