major rebuild and rearrangement