change func name iterateLinks to filterLinks