refactoring sonar: loc=3,212 - cov=52,7% - debt=0d