Remove unnecessary code
Add another diagnose_data fun