add role function.