Added a new test case and implementation