run function for each item returned by the selector