refactoring handler, fragments