worked on model optimization

pats new formula for r2, new model optimization markdown file under
figure 6 including html output