Added intermediate varaibles to calc values for capsule storage.