Now takes input from stdin as well as from the command line.