link and sort