Exercies, refactoring