slight refactor.