d_value and ems sorting added