Add test cases
refactoring