made hellllllllla changes and finished find_row.m, which can be tested using test.m