Splitting line, adding agentId to copy constructor and swap