Answer ex3.17
Extract a function for refactoring
Extract a function for refactoring (again)