changed mac-grab-link function