improve emac code readability