lab01 refactor.