reads from stdin instead of file