minor refactor.