modified for agent forwarding