Modified code of string comparision