adding case for calculating min/max for ei