added some event listeners