Refactor for early return