more debugging on set_permissions
set_permissions is doing something now
merged everything