Please move the definition of the function after `loadJSON`.