modified to standard input