fixed wrong variable assignment
added role hierarchy for the security