Stupid simple refactor using extract function.