support reading from stdin; added documentation