function at the bottom 2 event listeners