change lastAgentId member variable to _lastAgentID