Added logic for command line argument