can't iterate in function argument