refactored fragment manager