support reading from stdin