update element classes.