Can we rewrite this using mkString?