refactored fragment registration