finish main.py script

Change-Id: I878aa2f98200804a75c94befa63d42df316e67ca