updated the tutorial code