prepare sorting links