1) fix bugs of {n, m}, 2) fix bugs in top matcher