adjusting code for tutorial