sudo should be external to script