mild refactoring