added class check