Refactor for simplification