calculate on distance method COMMIT