Using nested trusted functions