adding listener each time button is clicked