Refactor pre-lesson2.