step 6 of tutorial, fixes in step 4-5