changed from array list to array