creating admin dashboard and moving logic there