better links logic