changed array declaration method