changed to array for data storage