simplify the logic on the sudo checks