Refactor for simplicity