adds an abstract event listener