added instance check