added precursor code to run the example code.