updated from_name logic