Code for the tutorial