modified mainactivitydemo