back to nxm matrix