minimal refactor.