changing List to array