Adding support for role and type