update final distance