Fixed all the test cases to pass.