Travis won't let me make functions in a for loop, even though the situation needs it.