a minor refactor