admin panel refactoring