add emd, but cannot compile