adding event based listening