refactoring admin page