basic sudo logic