mild refactor