minor refactor