some tutorial code for week 4