added block if __name__ == "__main__": for better compatibility