helper methods to add event listeners