construct the data structures