refactored code-added buttons-eventlistener to change header,text,&list