changed permissions function