computing distance in meters