added debug information with test cases