refactor admin