created abstract class for context listener