make merge-rows a one-liner by using map