expanding previous commit to use streamreader instead of string