Merge z and m