installed event listener on button wich responds to click