Uncaught ReferenceError: createInput is not defined

Hi Folks, getting this error on the following code in the Processing IDE. Works fine in the web editor. Not sure what the difference is, or why it can’t find createInput, which is a a p5 function… any thoughts? thanks!

var command = 'scry';

let params = {
    ignoreStopWords: true,
    ignoreCase: true,
    ignorePunctuation: true

function setup() {
  createCanvas(400, 400);
  background(250, 200, 0);
  let inp = createInput(''); 
  inp.position(80, 50);

function draw(){
  button = createButton(command);
  button.position(input.x + input.width, 50);

On Mac OSX 10.14.6 and Processing IDE 3.5.3