can sudo logic