added the source code for the example