make imageData a global variable

make imageData a global variable