changes and test cases added