started writing code to output documents for Summa, not complete yet