another small refactor