check for proper inheritance before attaching event listener class