fix indentation, change changePermission to setPermission