added sys argument, takes input from commandline