i am guessing that r means row and c mean column, if so lets use those names instead one letter variable names, they are not meaningfull