admin controller refactored