changed structure of Mainactivity