add longest substring in 2