added hasClass method; see issue #16