Refactor for admin