cut refactored and test case added