learning flatMap function in collection framework