working version of tutorial 1