I need the boolem variable to turn true when I click a button. So I created a function for this purpose.