small refactor