control buttons in MainActivity