For some reason, need to move the imports inside generate() or else they are they are not seen(?)