Modified code to use command line argument