Changing 'role' to 'type'