impemented init of emac