reimplmented checkpoining based on work from the main-chris branch. also renamed outputStructure to summa_struct