hopefully finalised restructure