updated MainActivity.java file