some example code / exercises from week 5 and 6