refractor variable names offsetX and offsetY to col, row