Replaced concat $ map with concatMap