updated the code example to match the test case