add class apply and update