small refactor for simplification