refactor week 3 examples