written a more complex test and example code