moved example code into the test suite