Changed distance to DISTANCE (const)