Implementation added as per test cases 3 Test Cases runs successfully