fixed and added new test case