add trim() to reading from stdin, so that it also works on Windows