refactoring and fixing data admin