added test case and changes