added from_string method