set matrix elements to 0 if a[i][j]==0 completed