Use nested trusted function