break out / simplify sudo logic