updated function addPermission() so it uses permissionExists()