update caculate distance