lab10 got from_str working with self