added ability to handle the case when len(argv)<2.