added ability to read from stdin, meaning scripting is now possible