text finished, now need to bring back old code from old commits and add plots to latex