Use helper to reduce duplicate code.