Make iteration 2 GREEN, refactor code