tutorial 1 with errors fixed