packaged the whole script inside if __name__ == '__main__': block