refactoring: redundant code removed to improve code coverage