updated and added test case