implemeneted string compare