optimizations and arrays left