added instance checking through Set