reimplement handling standard input