refactoring groupPageFile