more minor refactor