Turns out it's not finished. The assessment is done by automation and I have to convince the machine that my program is good (which obviously failed by now). The assignment has  a requirement that the indices of the matrix should start from 1, while the indices of a normal array starts from 0. Why? It's quite silly...