test cases debugged