Sort:  

Now that you mentioned, it can be done with a function that takes the role as the parameter :D i will do that.