started writing solve and test for solve, and now define index of row