Added method for switching fragments.