finish the example code