Added more advanced example code