new test cases added, refactored