Added row and column parsing for sameSum