updated example with a few comments