sped up m-step by only looking at (m,n) pairs that *actually* occured