Code refactoring for the implementation of the functionality
Code refactoring for the test