major rework of data structures