Changes to calculate eic only one time.