added privileges system logic