Nice version 2.3
Refactoring the code