runs for nxm blocks