add solution for longest substring