copies read string into struct instead of hoping it will stay long enough to use a cast pointer