modifiying update distance