switch from class to element for directive