calculating i,j in a cell-centered world. Needs testing