Updated calculation formula to include array information instead of old variable selections.