Link sorts with main