lots of changes to structure