changes to basic structure in a few places