modified when distance is calculated