Created indexCalc.R