code to set/get delegate trust level