added onclicklistener method to mainactivity