week 6 code, first cut