moved main to if __main__