adding data to data structure