Trigger-like function