add get links function