move the main() to getImg.js.