Changed distance computation