What is wrong in this it is running but not satisfying test cases