linked to generation function on the button.