adds code for Tutorial 2