handling the permissions