added role function