Add a function which read the text from stdin