this allocation is expensive. You should only allocate it once (outside the for loop) and overwrite  values at every iteration.