eliminate a pile of array allocations