modified for s_ij and e_min