Solution for 23
Refactoring
Refactoring