created code for the tutorial