Changed method of reading STDIN