refactoring, moved admin function into own class