Modified to take command line args.