Finished the tutorial code