added more logic to roles