refactored admin