Part 2 - update pseudocode, initial, refactor