tutorial 3 and partial tutorial 4