Update rename the longest substring