changed main.js for calculations from model/changes in renderGraph.js to accomodate extra parameters