new version that store temp role in a custom table