updated the advanced example