add a more complex example and test case