cleaned up the example code.