refactored admin controller