add if name == main statement to allow running from command line