small refactorings to improve code readability