Adding class check