not the best way to read string from stream