code was ignoring admin flag