begining of refactoring admin part