refs 2. optimize the implement of emp editor