modified the emac