added fragment code to main activity