cleaned up permissions, added commented-out code for superuser permissions