refactored main activity to extend FragmentActivity