preparing the data structure