added hasClass method