Refactoring attempt 2
Refactoring