added new test scenarios and modified code in test-1 to address comments