began to prepare the datastructure