week 4 - encode