add longest common substring solution