added correct to_json includes for references