modified MainActivity