updated codes from week 1