modified sudo code