improved array loading