add event listener for task