I am new to scala. I need a lot of help with using maps and flatmaps with tuples.

I have functions as follows-

```
    def extract(url: String): String = {//some code}
    def splitstring(content: String): Array[String]={//some code}
    def SentenceDetect(paragraph: Array[String]): Array[String] = {//some code}
    def getMd5(literal: String): String = {//some code}

```

I have a incoming list of urls. and I want it to go through above series of functions using map and flatmaps.

```
    var extracted_content=url_list.map(url => (url,extract(url)))

    val trimmed_content=extracted_content.map(t => (t._1,splitstring(t._2)))

    val sentences=trimmed_content.map(t => (t._1,SentenceDetect(t._2)))

    val hashed_values=sentences.flatMap(t => (t._1,getMd5(t._2)))

```

The issue is I am getting at error at flatMap as type mismatch--

```
Error:(68, 46) type mismatch;
  found   : (String, String)
  required: scala.collection.GenTraversableOnce[?]
val hashed_values=sentences.flatMap(t => (t._1,getMd5(t._2.toString)))

```

How to get it done.