calcDistance method add.