change sudo logic