wrapping up most of the structure