Utils: new function distance()