corner case study and debug