yay - dont make function in loop