create button logic in html and change event listener