adding support for reading from stdin