fragment refactoring