added check for __main__