loading data into array