Added the scatter_nxm method