added immage get function to main.py