replaces sys.argv with optparse for user input variables