i dont quite get the utility of this line. It could be made much easyer, with 3-4 more commands


i = 2*(longestRow-row+1) - 1;