Wrap every specific element search into own function