I think this is allocating a new array every time.