Updated to take command line arguments