Added a function to get the distance between two cells.