more debugging and test cases