more performance improvements, drop array allocations.