test cases and bugs