Refactorized Excercise 6.20