move main to __main__