changed to_str() to to_string() for mime gens